package pl.matt.media.procesor.impl;

import java.io.IOException;

import pl.matt.media.manager.ImageManager;
import pl.matt.media.manager.MediaManagersFactory;
import pl.matt.media.model.ImageType;
import pl.matt.media.procesor.FrameProcessor;

public class VerticalDivideFrameProcessor implements FrameProcessor {

	private ImageManager imageManager = MediaManagersFactory.getImageManager();
	private String leftSuffix = "l";
	private String rightSuffix = "r";
	
	@Override
	public void processFrame(String sourceImagePath) throws IOException {
		String destinationImagePath1 = sourceImagePath.replace(".", "_" + leftSuffix + ".");
		String destinationImagePath2 = sourceImagePath.replace(".", "_" + rightSuffix + ".");
		imageManager.divideImage(sourceImagePath, destinationImagePath1, destinationImagePath2, false, ImageType.JPEG);		
	}

}
